package com.itheima.mapper;

import com.itheima.pojo.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CategoryMapper {

    //增加分类
    int addCategory(Category category);

    //获取分类下拉列表
    List<Category> getList(Integer type);

    //分类分页
    List<Category> page(@Param("start") Integer start, @Param("pageSize") Integer pageSize);

    //计算 total(总条数)
    long countCategory();

    //删除分类
    int deleteCategory(String id);

    //修改分类
    int updateCategory(Category category);

    //根据Id查询
    Category getCategoryById(String id);

    List<Category> getMobileList();
}
